package com.learn.security.common.constant;

import cn.hutool.core.util.StrUtil;
import com.fasterxml.jackson.annotation.JsonCreator;

/**
 * created by yuanjunjie on 2019/8/19 3:50 PM
 */
public enum EPlatform {
    Web,
    WeiXin,
    Android,
    IOS;


    @JsonCreator
    public EPlatform create(String name) {
        for (EPlatform platform : EPlatform.values()) {
            if (StrUtil.equalsIgnoreCase(platform.name(), name)) {
                return platform;
            }
        }
        return null;
    }
}
